<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script type="text/javascript">
    var setting = {
        check: {
            enable: true,
            autoCheckTrigger: true
        },
        async: {
            enable: true,
            dataType: "json",
            url: "/menucontroller/getzTree",
            autoParam: ["id", "name"]
        }
    };
    $(document).ready(function(){
        $.fn.zTree.init($("#treeDemo"), setting);
    });
</script>
<body>
    <form class="form-horizontal" role="form" id="roleid">
        <div class="form-group">
            <label for="firstname" class="col-sm-2 control-label">职务</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="firstname" placeholder="请输入职务" name="roleName">
            </div>
        </div>
        <div class="form-group">
            <label for="treeDemo" class="col-sm-2 control-label">权限</label>
            <div class="col-sm-10">
                <ul id="treeDemo" class="ztree"></ul>
            </div>
        </div>
    </form>
</body>
</html>